package com.binfenhulian.chinaenergy.ces.manage.framework.filter;

import org.sitemesh.builder.SiteMeshFilterBuilder;
import org.sitemesh.config.ConfigurableSiteMeshFilter;

import javax.servlet.annotation.WebFilter;

/**
 * Created by wanghjbuf on 2018/3/8.
 */
@WebFilter(filterName="siteMeshFilter",urlPatterns="/*")
public class WebSiteMeshFilter extends ConfigurableSiteMeshFilter {

    @Override
    protected void applyCustomConfiguration(SiteMeshFilterBuilder builder) {
        builder.addDecoratorPath("/manage/*", "/decorator/header")
                .addExcludedPath("/static/**")
                .addExcludedPath("/manage/login")
                .addExcludedPath("/manage/login.html")
                .addExcludedPath("/manage/logout.html")
                .addTagRuleBundle(new CustomTagRuleBundle());  ;
    }
}
